Skip to content

Conversation

06luki06
Copy link
Contributor

@06luki06 06luki06 commented May 15, 2024

Add the possibility of adding noteEvents via the addHook().

Fixes: #1121

06luki06 and others added 2 commits May 7, 2024 10:18
Add the possibility of adding noteEvents via the addHook().
@jmini
Copy link
Collaborator

jmini commented May 16, 2024

I have made a change to preserve the old addHook(..) method to avoid breaking changes.

I also think that org.gitlab4j.api.ProjectApi.addHook(Object, String, ProjectHook, Boolean, String) is the method that is maintained and that should be used. So your method is now delegating to this method.

@jmini jmini merged commit 224f4c5 into gitlab4j:main May 16, 2024
@06luki06 06luki06 deleted the add-note-event-to-addhook-method branch May 16, 2024 17:34
@MarkEWaite
Copy link

I believe that the API change of the fourth argument boolean (primitive type, nulls not allowed) to Boolean (object, nulls allowed) is a breaking change. The change in the diff went from this:

    public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks,
            boolean enableSslVerification, String secretToken) throws GitLabApiException {

to this:

    public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks,
            Boolean enableSslVerification, String secretToken) throws GitLabApiException {

The Jenkins issue tracker received two reports of method not found exceptions in issue JENKINS-73672.

Is there a critical need for the change of type in the argument?

If not, could that change be reverted and a new release provided so that API compatibility is retained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing feature of creating a note-webhook

3 participants